import { v4 as uuidv4 } from 'uuid';

export const getUserTempId = () => {
  //1.先从本地存储中获取一下
  let getUserTempId = localStorage.getItem('userTempId')
  //2.如果没有的话，就要先生成一份
  if (!getUserTempId) {
    localStorage.setItem('userTempId',uuidv4())
  }

  return getUserTempId//返回数据
}